package cn.ljy.authority.model;

import cn.ljy.common.model.BaseModel;
import cn.ljy.common.model.validate.UpdateWorkValidation;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

//账户信息
@ApiModel(value = "店铺管理")
@Data
@EqualsAndHashCode(callSuper = false, of = {"id"})
@NoArgsConstructor
public class SysShop extends BaseModel {

    @NotNull(groups = UpdateWorkValidation.class, message = "id不能为空")
    private Long id;

    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @NotBlank(message = "用户id不能为空")
    private SysUser user;
    private Long userID;

    @NotBlank(message = "店铺名称不能为空")
    @Length(max = 100, message = "店铺名称长度不能超过 {max} 个字符")
    private String shopName;

    @Length(max = 255, message = "营业执照长度不能超过 {max} 个字符")
    private String businessLicense;

    @NotBlank(message = "联系人不能为空")
    @Length(max = 50, message = "联系人长度不能超过 {max} 个字符")
    private String contactPerson;

    @NotBlank(message = "联系电话不能为空")
    @Length(max = 20, message = "联系电话长度不能超过 {max} 个字符")
    private String contactPhone;

    @NotBlank(message = "店铺地址不能为空")
    @Length(max = 255, message = "店铺地址长度不能超过 {max} 个字符")
    private String shopAddress;

    @NotNull(message = "门店租用开始时间不能为空")
    private Date leaseTermStart;

    @NotNull(message = "门店租用结束时间不能为空")
    private Date leaseTermEnd;

    @Length(max = 255, message = "店主身份证正面图片URL长度不能超过 {max} 个字符")
    private String ownerIdCardFrontUrl;

    @Length(max = 255, message = "店主身份证反面图片URL长度不能超过 {max} 个字符")
    private String ownerIdCardBackUrl;

    @Length(max = 255, message = "营业执照正面图片URL长度不能超过 {max} 个字符")
    private String businessLicenseUrl;

    @Length(max = 255, message = "门店门头照图片URL长度不能超过 {max} 个字符")
    private String storeFrontImageUrl;

    @Length(max = 255, message = "店内环境照图片URL长度不能超过 {max} 个字符")
    private String storeInteriorImageUrl;

    @Length(max = 255, message = "工位图片URL长度不能超过 {max} 个字符")
    private String workSeatImageUrl;

    private Long auditUser;

    @NotNull(message = "审核结果不能为空")
    private Integer auditResult;

    @Length(max = 255, message = "审核长度不能超过 {max} 个字符")
    private String auditNote;

    private Date auditTime;

    public SysShop(Long id) {
        this.id = id;
    }
}